package cn.gitee.ffmpeg.processed.config;

import org.springframework.scheduling.concurrent.CustomizableThreadFactory;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author xuhainan
 * @date 2023/2/23 14:28
 * @region hefei
 */
public class CommonThreadPool {

	private static final int core = Runtime.getRuntime().availableProcessors();
	//	private static final int core = 2;
	public static ThreadPoolExecutor THREAD_POOL = new ThreadPoolExecutor(2, 2 * 2,
		60L, TimeUnit.SECONDS, new ArrayBlockingQueue<>(500),
		new CustomizableThreadFactory("common-thread-"));

}
